<section class="wrapper">
  <!-- page start-->
  <div class="row">
    <div class="col-lg-12">
      <section class="panel">
        <header class="panel-heading">
          查 看&nbsp&nbsp <a href="/admin/activities/<%= @activity.id %>/edit"><button class="btn btn-info" type="button">修改</button></a>
        </header>
        <div class="panel-body">
          <form class="form-horizontal adminex-form" >
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>名称</label>
              <div class="col-sm-10">
                <input type="text" name="name" value="<%= @activity.name %>" class="form-control" placeholder="请输入活动名称">
              </div>
            </div>
            <input type="text" class="show_content" hidden value="<%= @activity.content %>">
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>内容</label>
              <div id="editor" class="col-sm-10">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>报名开始日期</label>
              <div class="col-sm-10">
                <input name="apply_start_time" value="<%= @activity.apply_start_time.to_s[0..10] %>" class="form-control jcDate">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>报名截止日期</label>
              <div class="col-sm-10">
                <input name="apply_end_time" value="<%= @activity.apply_end_time.to_s[0..10] %>" class="form-control jcDate">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>状态</label>
              <div class="col-sm-10">
                <input type="text" value="<%= get_dict(:status)[@activity.status.to_s] %>" class="form-control">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"></label>
              <div class="col-sm-10">
                <button type="button" class="btn btn-primary" id="submit_data" data-url="/admin/activities/<%= @activity.id %>">提交</button>
              </div>
            </div>
          </form>
        </div>
      </section>
    </div>
  </div>
</section>
<% content_for :js do %>
  <!-- 注意， 只需要引用 JS，无需引用任何 CSS ！！！-->
  <script type="text/javascript" src="/js/wangEditor.min.js"></script>
  <script type="text/javascript" charset="utf-8">
      $(function (){
          var content = $('.show_content').val();
          $('#editor').html(content);
      });
  </script>
<% end %>